package com.account.boot.service.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.account.boot.dao.AdminMapper;
import com.account.boot.model.Admin;
import com.account.boot.model.vo.AdminVo;

@Service
public class AdminMapperService {

	@Autowired
	private AdminMapper adminMapper;
	
	public AdminVo findByName(String name) {
		Admin admin = adminMapper.selectByName(name);
		if(admin != null) {
			return new AdminVo(admin);
		}
		return null;
	}
}
